import request from '@/utils/request'

export default {
  findAll(page,limit,searchObj) {
    return request({
      url: `/admin/spread/cpClient/list/${page}/${limit}`,
      method: 'post',
      params: searchObj
    })
  },
  removeById(id){
    return request({
      url:'/admin/spread/cpClient/remove/'+id,
      method:'delete',
    })
  },
  save(cpClient) {
        return request({
            url: '/admin/spread/cpClient/save',
            method: 'post',
            data: cpClient
        })
    },

    onUploadRemove(url) {
      return request({
     url: `http://localhost:8130/api/oss/file/removeFile?url=/${url}`,
       method: 'delete',
      })
      },

    findClientById(id){
      return request({
        url:'/admin/spread/cpClient/findById/'+id,
        method:'post'
      })
    },

    updateClient(cpClient){
      return request({
        url:'/admin/spread/cpClient/updateClient',
        method:'post',
        data: cpClient
      })
    },

    findInvite(page,limit,searchObj) {
      return request({
        url: `/admin/spread/cpInvite/list/${page}/${limit}`,
        method: 'post',
        params: searchObj
      })
    },

    removeId(id){
      return request({
        url:'/admin/spread/cpInvite/remove/'+id,
        method:'delete',
      })
    },

    findInviteById(id){
      return request({
        url:'/admin/spread/cpInvite/findById/'+id,
        method:'post'
      })
    },

    removeIds(idList){
      return request({
        url:'/admin/spread/cpClient/removeIds',
        method:'delete',
        data:idList,
      })
    },
     //批量删除
    removeIds(idList){
      return request({
        url:'/admin/spread/cpInvite/removeIds',
        method:'delete',
        data:idList,
      })
    },

     
    // findElectriccard(){
    //   return request({
    //     url:'/admin/spread/cpClient/findElectricCard',
    //     method:'post'
    //   })
    // },
    // findInvestor(){
    //     return request({
    //       url:'/admin/spread/cpClient/findInvestor',
    //       method:'post'
    //     })
    // },

    // findSex(){
    //   return request({
    //     url:'/admin/spread/cpClient/findSex',
    //     method:'post'
    //   })
    // },

    // findAccountlevel(){
    //   return request({
    //     url:'/admin/spread/cpClient/findAccountLevel',
    //     method:'post'
    //   })
    // }

    
}